package SwingModel;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Arrays;
import java.util.Date;

import JDBC.CmsDatabaseConnection;
import JDBC.PeopleActivities;

public class CmsQuizSubmission{
	
	private String studentID;
	private int quizID;
	private char[] answer;
	private double givenPoint;
	private Date submittedDate;
	
	public CmsQuizSubmission(String studentID, int quizID,
			char[] answer, double givenPoint) {
		this.studentID = studentID;
		this.quizID = quizID;
		this.answer = answer;
		this.givenPoint = givenPoint;
		this.submittedDate = new Date();
	}
	
	@Override
	public String toString(){
		return "Quiz: \n"
				+ "studentID: " + studentID + "\n"
				+ "quizID: " + quizID + "\n"
				+ "answer: " + Arrays.toString(answer) + "\n"			
				+ "givenPoint: " + givenPoint + "\n";
	}
	//---------------------------------------------------------
	//GETTERS AND SETTERS:
	//---------------------------------------------------------
		
	public String getStudentID() {
		return studentID;
	}
	public void setStudentID(String studentID) {
		this.studentID = studentID;
	}
	public int getQuizID() {
		return quizID;
	}
	public void setQuizID(int quizID) {
		this.quizID = quizID;
	}
	public char[] getAnswer() {
		return answer;
	}
	public void setAnswer(char[] answer) {
		this.answer = answer;
	}
	public double getGivenPoint() {
		return givenPoint;
	}
	public void setGivenPoint(double givenPoint) {
		this.givenPoint = givenPoint;
	}

	public Date getSubmittedDate() {
		return submittedDate;
	}

	public void setSubmittedDate(Date submittedDate) {
		this.submittedDate = submittedDate;
	}



}
